/*
 * testSrc.cpp
 *
 *  Created on: May 21, 2012
 *      Author: marchi
 */
#include "FstreamC.h"
#include "FstreamF.h"
#include "AA.h"

int main(){
	AA y,z;
	FStream * fin;
	string file="myfile";
	string answer;
	cout << "enter  F/C: ";
	cin >> answer;

	if(answer.find("F") != string::npos)
		fin=new FstreamF(file);
	else if(answer.find("C") != string::npos)
		fin=new FstreamC(file);
	else{
		cout << " unrecognized character !! " + answer << "\n";
		exit(-1);
	}

	FStream & gin=*fin;

	gin >>y;
	gin >>z;
	y.print();
	z.print();
	return 0;
}


